package com.iss.demo.service;

import com.iss.demo.dao.BookDao;
import com.iss.demo.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class BookService {

    @Autowired
    private BookDao dao;

    public List<Book> selectAll() {
        return dao.selectAll();
    }
    public Integer insertBook(Book book) {
        return dao.insertBook(book);
    }
    public Integer deleteOne(Integer b_id) {
        return dao.deleteOne(b_id);
    }
    public Integer updateBook(Integer b_id) {
        return dao.updateBook(b_id);
    }
    public List<Book> selectById(Integer u_id) {
        return dao.selectAllById(u_id);
    }
}
